package hfjava;

public class Demo_3 {
    public static void main(String[] args) {
        int[] nums=new int[10];
        for (int i = 0; i <10 ; i++) {
            int num =(int)(100*Math.random());
            nums[i]=num;
        }
        int max=nums[0];
        int min =nums[0];
        for (int i = 1; i <nums.length ; i++) {
            if (max<nums[i]){
                max=nums[i];
            }
            if (min>nums[i]){
                min=nums[i];
            }
        }
        System.out.println("最大值："+max+"\n"+"最小值"+min);

    }
}
